<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html   xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<h:form>
	   <p:inputText id='username' value="#{user.name}"/>
	   <p:button value="Ekle" oncomplete="#{user.addName()}" update="listTable"/>
	</h:form>
	
	<p:panel>
	<p:dataTable id="listTable" var="item" value="#{user.nameList}">
  
    <p:column headerText="Name">
        <h:outputText value="#{item}" />
    </p:column>	
	
	</p:dataTable>
	
	</p:panel>


</body>
</html>